#pragma once

namespace xml_api
{
  class Memento;

  class KeyValue
  {
  public:
    string csKey;
    string csValue;
  };

  class KeyObject
  {
  public:
    string csKey;
    Memento * pMemento;
  };

  class  KeyValueCollector
  {
  public:
    KeyValueCollector(){};
    virtual ~KeyValueCollector();
  private:
    vector<KeyValue> m_list;
  public:
    void Add(string key, string value);
    bool Remove(string key);
    bool Remove(int index);
    bool RemoveByValue(string value);
    void Clear();
    int GetCount();
    string GetKey(int index);
    string GetValue(int index);
    string GetValue(string key);
  };

  class  KeyObjectCollector
  {
  public:
    KeyObjectCollector(){};
    virtual ~KeyObjectCollector();
  private:
    vector<KeyObject> m_list;
  public:
    void Add(string key, Memento * object);
    bool Remove(string key);
    bool Remove(int index);
    bool Remove(Memento * object);
    void Clear();
    int GetCount();
    string GetKey(int index);
    Memento * GetObject(int index);
    Memento * GetObject(string key);
  };

  class MementoArray
  {
  public:
    MementoArray(){};
    virtual ~MementoArray(){
      Clear();
    };
  private:
    vector<Memento*> m_ary;
  public:
    Memento *GetAt(int index);
    int GetCount();
    void Clear();
    void Add(Memento * pm);
  };
}